package com.ruiysoft.entity.sys;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author huazengguang
 * @since 2018-11-17
 */
@TableName("sys_shop_distribution")
@Accessors(chain = true)
@Setter
@Getter
public class SysShopDistribution extends Model<SysShopDistribution> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("shop_id")
    private Long shopId;

    @TableField("first_ratio")
    private BigDecimal firstRatio;

    @TableField("second_ratio")
    private BigDecimal secondRatio;

    @TableField("minimum_amount")
    private BigDecimal minimumAmount;

    private Boolean enabled;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_time")
    private Date updateTime;

    @TableField("name")
    private String name;

    /**
     * 是否默认规则, 1默认规则, 0 不是默认规则
     */
    @TableField("defaultFlag")
    private String defaultFlag;

    private Integer version;

//    public Long getId() {
//        return id;
//    }
//
//    public SysShopDistribution setId(Long id) {
//        this.id = id;
//        return this;
//    }
//    public Long getShopId() {
//        return shopId;
//    }
//
//    public SysShopDistribution setShopId(Long shopId) {
//        this.shopId = shopId;
//        return this;
//    }
//    public BigDecimal getFirstRatio() {
//        return firstRatio;
//    }
//
//    public SysShopDistribution setFirstRatio(BigDecimal firstRatio) {
//        this.firstRatio = firstRatio;
//        return this;
//    }
//    public BigDecimal getSecondRatio() {
//        return secondRatio;
//    }
//
//    public SysShopDistribution setSecondRatio(BigDecimal secondRatio) {
//        this.secondRatio = secondRatio;
//        return this;
//    }
//    public BigDecimal getMinimumAmount() {
//        return minimumAmount;
//    }
//
//    public SysShopDistribution setMinimumAmount(BigDecimal minimumAmount) {
//        this.minimumAmount = minimumAmount;
//        return this;
//    }
//    public Boolean getEnabled() {
//        return enabled;
//    }
//
//    public SysShopDistribution setEnabled(Boolean enabled) {
//        this.enabled = enabled;
//        return this;
//    }
//    public Date getCreateTime() {
//        return createTime;
//    }
//
//    public SysShopDistribution setCreateTime(Date createTime) {
//        this.createTime = createTime;
//        return this;
//    }
//    public Date getUpdateTime() {
//        return updateTime;
//    }
//
//    public SysShopDistribution setUpdateTime(Date updateTime) {
//        this.updateTime = updateTime;
//        return this;
//    }
//    public Integer getVersion() {
//        return version;
//    }
//
//    public SysShopDistribution setVersion(Integer version) {
//        this.version = version;
//        return this;
//    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysShopDistribution{" +
        "id=" + id +
        ", shopId=" + shopId +
        ", firstRatio=" + firstRatio +
        ", secondRatio=" + secondRatio +
        ", minimumAmount=" + minimumAmount +
        ", enabled=" + enabled +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", version=" + version +
        "}";
    }
}
